package com.ruoyi.web.service;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.FoodCondimentMapper;
import com.ruoyi.web.domain.FoodCondiment;


/**
 * 调料Service业务层处理
 *
 * @author xian_pei
 * @date 2024-06-10
 */
@Service
public class FoodCondimentService
{
    @Autowired
    private FoodCondimentMapper foodCondimentMapper;

    /**
     * 查询调料
     *
     * @param condimentId 调料主键
     * @return 调料
     */

    public FoodCondiment selectFoodCondimentByCondimentId(Long condimentId)
    {
        return foodCondimentMapper.selectFoodCondimentByCondimentId(condimentId);
    }

    /**
     * 查询调料列表
     *
     * @param foodCondiment 调料
     * @return 调料
     */

    public List<FoodCondiment> selectFoodCondimentList(FoodCondiment foodCondiment)
    {
        return foodCondimentMapper.selectFoodCondimentList(foodCondiment);
    }

    /**
     * 新增调料
     *
     * @param foodCondiment 调料
     * @return 结果
     */

    public int insertFoodCondiment(FoodCondiment foodCondiment)
    {
        return foodCondimentMapper.insertFoodCondiment(foodCondiment);
    }

    /**
     * 修改调料
     *
     * @param foodCondiment 调料
     * @return 结果
     */

    public int updateFoodCondiment(FoodCondiment foodCondiment)
    {
        return foodCondimentMapper.updateFoodCondiment(foodCondiment);
    }

    /**
     * 批量删除调料
     *
     * @param condimentIds 需要删除的调料主键
     * @return 结果
     */

    public int deleteFoodCondimentByCondimentIds(Long[] condimentIds)
    {
        return foodCondimentMapper.deleteFoodCondimentByCondimentIds(condimentIds);
    }

    /**
     * 删除调料信息
     *
     * @param condimentId 调料主键
     * @return 结果
     */

    public int deleteFoodCondimentByCondimentId(Long condimentId)
    {
        return foodCondimentMapper.deleteFoodCondimentByCondimentId(condimentId);
    }
}
